[gd_scene load_steps=7 format=2]

[ext_resource path="res://Scenes/VehicleController/VehicleController.gd" type="Script" id=1]
[ext_resource path="res://Scenes/VehicleController/PIDController/PIDController.tscn" type="PackedScene" id=2]
[ext_resource path="res://Scenes/VehicleController/WheelController/WheelController.tscn" type="PackedScene" id=3]
[ext_resource path="res://Scenes/VehicleController/ForceCurve.tres" type="Curve" id=4]
[ext_resource path="res://Scenes/VehicleController/OmegaCurve.tres" type="Curve" id=5]

[sub_resource type="BoxShape" id=1]
extents = Vector3( 0.9, 0.25, 1.7 )

[node name="VehicleController" type="RigidBody"]
collision_layer = 0
mass = 1480.0
script = ExtResource( 1 )
force_curve = ExtResource( 4 )
omega_curve = ExtResource( 5 )

[node name="VehicleBody" type="Spatial" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.35, 0 )

[node name="CollisionShape" type="CollisionShape" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.11, 0 )
shape = SubResource( 1 )

[node name="FL" parent="." instance=ExtResource( 3 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.85, 0, -1.3 )

[node name="Wheel" type="Spatial" parent="FL"]
transform = Transform( 0.984808, 0.173648, 0, -0.173648, 0.984808, 0, 0, 0, 1, 0, 0, 0 )

[node name="FR" parent="." instance=ExtResource( 3 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.85, 0, -1.3 )

[node name="Wheel" type="Spatial" parent="FR"]
transform = Transform( 0.984808, -0.173648, 0, 0.173648, 0.984808, 0, 0, 0, 1, 0, 0, 0 )

[node name="RL" parent="." instance=ExtResource( 3 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.85, 0, 1.3 )

[node name="Wheel" type="Spatial" parent="RL"]
transform = Transform( 0.984808, 0.173648, 0, -0.173648, 0.984808, 0, 0, 0, 1, 0, 0, 0 )

[node name="RR" parent="." instance=ExtResource( 3 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.85, 0, 1.3 )

[node name="Wheel" type="Spatial" parent="RR"]
transform = Transform( 0.984808, -0.173648, 0, 0.173648, 0.984808, 0, 0, 0, 1, 0, 0, 0 )

[node name="SteeringController" parent="." instance=ExtResource( 2 )]
kp = 5000.0
ki = 500.0

[node name="DriftController" parent="." instance=ExtResource( 2 )]
kp = 1500.0

[node name="GripController" parent="." instance=ExtResource( 2 )]
kp = 1000.0
ki = 10.0

[node name="OmegaController" parent="." instance=ExtResource( 2 )]
kp = 50000.0
ki = 10000.0
